package com.graduation.mathematics.ui.activity;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.RecyclerView;

import com.graduation.mathematics.R;
import com.graduation.mathematics.adapter.ExerciseAdapter;
import com.graduation.mathematics.adapter.RankingAdapter;
import com.graduation.mathematics.base.BaseActivity;
import com.graduation.mathematics.bean.ExerciseStatistics;
import com.graduation.mathematics.bean.Ranking;
import com.lxj.xpopup.XPopup;

import org.litepal.LitePal;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

public class StatisticsExerciseActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.img_back)
    ImageView imgBack;

    @BindView(R.id.recycler_exercise)
    RecyclerView recycler_exercise;


    private ExerciseAdapter myAdapter;
    private List<ExerciseStatistics> datas = new ArrayList<>();

    @Override
    protected int getLayout() {
        return R.layout.activity_statistics_exercise;
    }

    @Override
    protected void initDataAndEvent() {
        tvTitle.setText("习题统计");

        recycler_exercise.addItemDecoration(new DividerItemDecoration(this,DividerItemDecoration.VERTICAL));
        myAdapter = new ExerciseAdapter(datas,this );
        recycler_exercise.setAdapter(myAdapter);
        
        initData();
    }

    private void initData() {
//        datas =
    }

    @OnClick({R.id.img_back})
    public void onViewClick(View view) {
        int id = view.getId();
        if (id == R.id.img_back) {
            finish();
        }
    }
}
